如何用if then实现<0时显示“无”>0时继续显示数据值?

来源:百度知道 编辑:UC知道 时间:2024/05/25 10:32:49
下面这样不行呀!!!!]
<%
if p_cmoney<0 then
response.write "无"
elseif p_cmoney>0 then
response.write "<%=p_cmoney%>"
else
end if
%>

本人大菜鸟一个,希望高手指点,小小20分作为奖励,谢谢
下面两个都不行呀,运行错误!!

<%
if p_cmoney<0 then
response.write "无"
else
response.write ""&p_cmoney&""

end if
%>

<%
if p_cmoney<0 then
response.write \"无\"
end if
if p_cmoney>0 then
response.write p_cmoney
end if
%>

<%
if CInt(p_cmoney)<0 then
response.write "无"
elseif CInt(p_cmoney)>0 then
response.write "<%=p_cmoney%>"
end if
%>
将上面改成这样就可以了!

<%
if rs("p_comoney")<0 then%>无
<%elseif rs("p_comoney")>0 then%><%=p_cononey%>
else
end if
%>